package com.qf.t1;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

/*
杨威
2021/9/3
17:57
*/
public class TestUpdate {
    public static void main(String[] args) throws Exception {
        Class.forName("com.mysql.jdbc.Driver");
        Connection connection = DriverManager.getConnection("jdbc:mysql:///schools?useSSL=false&chatacterEncoding=utf-8", "root", "1234");
        Statement statement = connection.createStatement();
        int i = statement.executeUpdate("update student set stu_address='shanghai1' where stu_id=1;");
        statement.close();
        connection.close();
    }
}
